package day7;

public class Member implements Comparable {
    private String cardNo;
    private String name;
    private String telephone;
    private int point;
    private String pswd;

    public Member() {
    }

    public Member(String cardNo, String name, String telephone,int point,String pswd) {
        this.cardNo = cardNo;
        this.name = name;
        this.telephone = telephone;
        this.pswd=pswd;
    }

    public String getCardNo() {
        return cardNo;
    }

    public void setCardNo(String cardNo) {
        this.cardNo = cardNo;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTelephone() {
        return telephone;
    }

    public int getPoint() {
        return point;
    }

    public void setPoint(int point) {
        this.point = point;
    }

    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }

    public String getPswd() {
        return pswd;
    }

    public void setPswd(String pswd) {
        this.pswd = pswd;
    }

    @Override
    public int compareTo(Object o) {
        if(o instanceof Member){
            Member a= (Member) o;
            return this.point-a.point;
        }
        return 0;
    }
}
